package com.feign.consumer.controller;

import com.feign.consumer.service.IConsumerService;
import com.feign.core.domain.AjaxResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/message")
public class ConsumerController {

    @Resource
    private IConsumerService consumerService;

    @GetMapping(value = "/handle")
    public AjaxResult getConsumeMessage() {
        return consumerService.getConsumeMessage();
    }

    @PostMapping("/commit")
    public AjaxResult consumeMessagePost() {
        return consumerService.consumeMessagePost();
    }


}
